import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect:"/recommend"
  },
  {
    path: '/recommend',
    name: 'Recommend',
    component: () => import('../views/Recommend.vue')
  },
  {
    path: '/songitem/:id',
    name: 'Songitem',
    meta:{
      hideHead:true
    },
    props:true,
    component: () => import('../views/Songitem.vue')
  },
  {
    path: '/hot',
    name: 'Hot',
    component: () => import('../views/Hot.vue')
  },
  {
    path:"/singger",
    name:"Singger",
    component:()=>import('../views/Singger.vue'),
  },
  {
    path:'/singersong/:id',
    name:"Singersong",
    meta:{
      hideHead:true
    },
    props:true,
    component:()=>import('../views/singersong.vue'),
    redirect:"/singersong/:id/singhot/:id",
    children:[
      {
        path:"singhot/:id",
        name:"Singhot",
        meta:{
          hideHead:true
        },
        props:true,
        component:()=>import('../views/Singhot.vue')
      },
      {
        path:"singmv/:id",
        name:"Singmv",
        meta:{
          hideHead:true
        },
        props:true,
        component:()=>import('../views/Singmv.vue')
      }
    ]
  },
  {
    path: '/search',
    name: 'Search',
    component: () => import('../views/Search.vue')
  },
  {
    path:"/commentLIst/:id/",
    name:"CommentLIst",
    meta:{
      hideHead:true
    },
    props:true,
    component:()=>import('../views/CommentLIst.vue')
  },
  {
    path:"/mvdetail/:id/:aid",
    name:"Mvdetail",
    meta:{
      hideHead:true
    },
    props:true,
    component:()=>import('../views/Mvdetail.vue')
  },
  {
    path:'/singermv/:id/:aid',
    name:'Singermv',
    meta:{
      hideHead:true
    },
    props:true,
    component:()=>import('../views/Singermv.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
